<template>
  <van-grid :column-num="6">
    <van-grid-item
      v-for="item in channel"
      :key="item.id"
      :icon="item.iconUrl"
      :text="item.name"
      @click="store.goToClassify(item.id)"
    />
  </van-grid>
</template>

<script setup>
import { defineProps } from "vue";
import { useCounterStore } from "@/stores/counter";
const store = useCounterStore();

const props = defineProps({
  channel: {
    type: Array,
    default: [],
  },
});
</script>

<style scoped lang="scss">
.van-grid {
    margin-bottom: 40px;
    background-color: white;
}
::v-deep .van-grid-item__content {
  padding: 10px;
}

</style>
